﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace CRM_Project
{
    public partial class AgentEditReservation : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request.QueryString.Count != 0)
                {
                    /*
                    string param;
                    param = Request.QueryString.GetValues("ReservationID")[0].ToString();
                    var result = from r in Reservation
                                 where r.ID.Equals(param)
                                 select r;

                    Reservation reservation = result.First();

                    carID_textbox.Text = reservation.CarID.ToString();
                    customer_textbox.Text = reservation.CustomerName;
                    cc_textbox.Text = reservation.CreditCardNumber.ToString();
                    pickupdate_calendar.SelectedDate = reservation.StartTime;
                    pickuplocation_textbox.Text = reservation.StartLot.Name;
                    dropoffdate_calendar.SelectedDate = reservation.EndTime;
                    dropofflocation_textbox.Text = reservation.EndLot.Name;
                    */
                }
            }
        }
    }
}
